﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeFile="AddArticle.aspx.cs"
    Inherits="Admin_AddArticle" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>添加文章</title>
    <script src="../script/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="../script/ckeditor/ckeditor.js" type="text/javascript"></script>
    <script src="../ckfinder/ckfinder.js" type="text/javascript"></script>
    <link href="skin/css/main.css" rel="stylesheet" type="text/css" />
    <link href="skin/css/base.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 102px;
        }
        .style2
        {
            width: 102px;
            height: 183px;
        }
        .style3
        {
            height: 183px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <div>
        <table cellpadding="1" cellspacing="1">
            <tr class="trHeader">
                <td colspan="2">
                    编辑资讯
                </td>
            </tr>
            <tr>
                <td class="style1">
                    标题：
                </td>
                <td>
                    <asp:TextBox ID="txtTitle" runat="server" Width="70%"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtTitle" Display="Dynamic" ErrorMessage="不可以为空！" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    所属分类：
                </td>
                <td>
                    <asp:DropDownList ID="drpCategoryName" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    关键词：
                </td>
                <td>
                    <asp:TextBox ID="txtKeyWord" runat="server" Width="70%"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtKeyWord" Display="Dynamic" ErrorMessage="不可以为空！" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    标签：
                </td>
                <td>
                    <asp:TextBox ID="txtTag" runat="server" Width="70%"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="txtTag" Display="Dynamic" ErrorMessage="不可以为空！" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    正文：
                </td>
                <td class="style3">
                    <asp:TextBox runat="server" ID="txtContent" TextMode="MultiLine" Width="99%" 
                        Height="335px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="txtContent" Display="Dynamic" ErrorMessage="不可以为空！" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    是否有图片封面：
                </td>
                <td>
                    <asp:DropDownList ID="drpIsPicCover" runat="server">
                        <asp:ListItem Value="0">否</asp:ListItem>
                        <asp:ListItem Value="1">是</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    图片封面1：
                </td>
                <td>
                    <asp:FileUpload ID="fup1" runat="server" />
                    图片尺寸：193px * 185px（用于首页展示）<asp:HyperLink ID="lblPicCoverUrl1" runat="server"></asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    图片封面2：</td>
                <td>
                    <asp:FileUpload ID="fup2" runat="server" />
                    图片尺寸：210px * 179px（用于首页、资讯详情页展示）<asp:HyperLink ID="lblPicCoverUrl2" runat="server"></asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    图片封面3：</td>
                <td>
                    <asp:FileUpload ID="fup3" runat="server" />
                    图片尺寸：457px * 305px（用于首页展示）<asp:HyperLink ID="lblPicCoverUrl3" runat="server"></asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    图片封面4：</td>
                <td>
                    <asp:FileUpload ID="fup4" runat="server" />
                    图片尺寸：316px * 190px（用于列表页展示）<asp:HyperLink ID="lblPicCoverUrl4" runat="server"></asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    图片封面5：</td>
                <td>
                    <asp:FileUpload ID="fup5" runat="server" />
                    图片尺寸：305px * 213px（用于首页页展示）<asp:HyperLink ID="lblPicCoverUrl5" runat="server"></asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    是否精华：
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="drpIsChoice">
                        <asp:ListItem Text="是" Value="1"></asp:ListItem>
                        <asp:ListItem Text="否" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    是否标记：
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="drpIsTag">
                        <asp:ListItem Text="是" Value="1"></asp:ListItem>
                        <asp:ListItem Text="否" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    是否热门：
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="drpIsHot">
                        <asp:ListItem Text="是" Value="1"></asp:ListItem>
                        <asp:ListItem Text="否" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button runat="server" ID="btnAdd" Text="保存" OnClick="btnAdd_Click" />
                    &nbsp;
                    <asp:Button ID="btnReturn" runat="server" onclick="btnReturn_Click" Text="返回" />
                    <asp:HiddenField runat="server" ID="hid" />
                </td>
            </tr>
        </table>
    </div>
    </form>
    <script type="text/javascript" language="javascript">
        CKEDITOR.replace('txtContent', { filebrowserBrowseUrl: '/ckfinder/ckfinder.html',
            filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?type=Images',
            filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?type=Flash',
            filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
            filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
            filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
        });

         
    </script>
</body>
</html>
